Title Banner


Technical Q&A's


QTMTB 04 - SetTextSampleData (1-May-95)




SetTextSampleData allows you to set values prior to calling AddTextSample or AddTESample. Two types are currently supported: dropShadowOffsetType and dropShadowTranslucencyType. The first type, dropShadowOffsetType, is the drop shadow offset. Pass the address of a point for the data parameter. dropShadowTranslucencyType is the drop shadow translucency. Pass a value from 0 to 255, where 0 is the lightest and 255 is the darkest.
	#define	dropShadowOffsetType		'drpo'
	#define	dropShadowTranslucencyType	'drpt'
pascal ComponentResult SetTextSampleData(MediaHandler mh, void *data, OSType 	dataType)

mh Reference to the Text Media Handler. Could use GetMediaHandler.
data Pointer to data, defined by dataType parameter.
dataType Sets the type of data in the handle. For now, either 'drpo' or 'drpt'.

Errors:

badComponentInstance 0x80008001 Your media reference is bad.

The following sample code snippet demonstrates the use of SetTextSampleData.

short trans = 127;
Point dropOffset;
MediaHandler mh;


dropOffset.h = dropOffset.v = 4;
SetTextSampleData(mh,(void *)&dropOffset,dropShadowOffsetType);
SetTextSampleData(mh,(void *)&trans,dropShadowTranslucencyType);

Be sure to turn on the dfDropShadow display flag when you call AddTextSample or AddTESample.

If you pass nil for textColor and/or backColor parameters in AddTextSample or AddTESample, they default to black (for textColor) and white (for backColor).
See also: QuickTime Tech Note QT4.

Technical Support
Technical Q&As
Previous Question | Contents | Next Question

Navigation graphic, see text links

Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help